Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Generated by a fuckwit (named joe), don't trust this
- loadrt [KINS]KINEMATICS
- #autoconverted trivkins
- loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
- loadrt corexy_by_hal names=corexy
- loadusr -W lcec_conf ethercat-conf.xml
- loadusr linuxcncrsh
- loadrt lcec
- loadrt cia402 count=3
- loadrt pid names=0-pid,1-pid
- addf lcec.read-all servo-thread
- addf cia402.0.read-all servo-thread
- addf cia402.1.read-all servo-thread
- addf cia402.2.read-all servo-thread
- addf corexy servo-thread
- addf motion-command-handler servo-thread
- addf motion-controller servo-thread
- addf 0-pid.do-pid-calcs servo-thread
- addf 1-pid.do-pid-calcs servo-thread
- addf cia402.0.write-all servo-thread
- addf cia402.1.write-all servo-thread
- addf cia402.2.write-all servo-thread
- addf lcec.write-all servo-thread
- # --- ect60 settings
- setp cia402.0.csp-mode 1
- setp cia402.0.pos-scale 133.33
- #net input-test <= lcec.0.2.input-test
- # AXIS X
- # --- joint signals for motion and driver to joint
- net j0motor-cmd <= joint.0.motor-pos-cmd => corexy.j0-motor-pos-cmd
- net alpha-cmd <= corexy.alpha-cmd => cia402.0.pos-cmd
- net alpha-fb <= cia402.0.pos-fb => corexy.alpha-fb
- net j0motor-fb <= corexy.j0-motor-pos-fb => joint.0.motor-pos-fb
- net j0enable <= joint.0.amp-enable-out => cia402.0.enable
- net x-home <= lcec.0.2.x-min => joint.0.home-sw-in
- # --- from stepper(ethercat) to cia402
- net x-statusword lcec.0.0.cia-statusword => cia402.0.statusword
- net x-opmode-display lcec.0.0.opmode-display => cia402.0.opmode-display
- net x-drv-act-pos lcec.0.0.actual-position => cia402.0.drv-actual-position
- net x-drv-act-velo lcec.0.0.actual-velocity => cia402.0.drv-actual-velocity
- # --- from cia402 to stepper(ethercat)
- net x-controlword cia402.0.controlword => lcec.0.0.cia-controlword
- net x-modes-of-operation cia402.0.opmode => lcec.0.0.opmode
- net x-drv-target-pos cia402.0.drv-target-position => lcec.0.0.target-position
- net x-drv-target-velo cia402.0.drv-target-velocity => lcec.0.0.target-velocity
- #*******************
- # AXIS Y
- #*******************
- net j1motor-cmd <= joint.1.motor-pos-cmd => corexy.j1-motor-pos-cmd
- net beta-cmd <= corexy.beta-cmd => cia402.1.pos-cmd
- net beta-fb <= cia402.1.pos-fb => corexy.beta-fb
- net j1motor-fb <= corexy.j1-motor-pos-fb => joint.1.motor-pos-fb
- net j1enable <= joint.1.amp-enable-out => cia402.1.enable
- net y-home <= lcec.0.2.y-min => joint.1.home-sw-in
- # --- ect60 settings
- setp cia402.1.csp-mode 1
- setp cia402.1.pos-scale 133.33
- # --- from servo(ethercat) to cia402
- net y-statusword lcec.0.1.cia-statusword => cia402.1.statusword
- net y-opmode-display lcec.0.1.opmode-display => cia402.1.opmode-display
- net y-drv-act-pos lcec.0.1.actual-position => cia402.1.drv-actual-position
- net y-drv-act-velo lcec.0.1.actual-velocity => cia402.1.drv-actual-velocity
- # --- from cia402 to servo(ethercat)
- net y-controlword cia402.1.controlword => lcec.0.1.cia-controlword
- net y-modes-of-operation cia402.1.opmode => lcec.0.1.opmode
- net y-drv-target-pos cia402.1.drv-target-position => lcec.0.1.target-position
- net y-drv-target-velo cia402.1.drv-target-velocity => lcec.0.1.target-velocity
- #setp cia402.2.opmode-no-mode 1
- setp cia402.2.pos-scale 250
- #from servo(ethercat) to cia402
- net z-statusword lcec.0.2.cia-statusword => cia402.2.statusword
- net z-opmode-display lcec.0.2.opmode-display => cia402.2.opmode-display
- net z-drv-act-pos lcec.0.2.actual-position => cia402.2.drv-actual-position
- net z-drv-act-velo lcec.0.2.actual-velocity => cia402.2.drv-actual-velocity
- #from motion to cia
- net z-enable <= joint.2.amp-enable-out => cia402.2.enable
- net z-amp-fault => joint.2.amp-fault-in <= cia402.2.drv-fault
- net z-pos-cmd <= joint.2.motor-pos-cmd => cia402.2.pos-cmd
- net z-pos-fb => joint.2.motor-pos-fb <= cia402.2.pos-fb
- net z-home <= lcec.0.2.z-min => joint.2.home-sw-in
- #from cia402 to servo(ethercat)
- net z-controlword cia402.2.controlword => lcec.0.2.cia-controlword
- net z-modes-of-operation cia402.2.opmode => lcec.0.2.opmode
- net z-drv-target-pos cia402.2.drv-target-position => lcec.0.2.target-position
- net z-drv-target-velo cia402.2.drv-target-velocity => lcec.0.2.target-velocity
- net estoploop iocontrol.0.emc-enable-in => iocontrol.0.user-enable-out
- net spindle-on spindle.0.on => lcec.0.2.out-1-en => lcec.0.2.out-1
Add Comment
Please, Sign In to add comment